{extend name='layout/base' /}
{block name='title'}删除管理员{/block}
{block name='contentHeader'}
<h1>
    用户管理
    <small>删除管理员</small>
</h1>
<ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> 用户管理</a></li>
    <li class="active">删除管理员</li>
</ol>
{/block}
{block name='content'}
<script src="__PLUGIN__/layer/layer.js"></script>
<link rel="stylesheet" href="__PLUGIN__/layer/skin/default/layer.css">
<!-- Horizontal Form -->
<div class="box box-info" style="width:90%;margin: 0 auto;">
    <div class="box-header with-border">
        <h3 class="box-title">用户参数</h3>
    </div>
    <!-- /.box-header -->
    <!-- form start -->
    <form class="form-horizontal" action="" method="post">
        <div class="box-body">
            <div class="form-group">
                <label for="admin_name" class="col-sm-2 control-label">管理员名称</label>
                <div class="col-sm-10">
                    <input type="hidden" name="admin_id" value="{$admin.admin_id}" />
                    <input type="text" class="form-control" id="admin_name" name="admin_name" value="{$admin.admin_name}" placeholder="管理员名称">
                </div>
            </div>
            <!--<div class="form-group">-->
                <!--<label for="admin_password" class="col-sm-2 control-label">管理员密码</label>-->
                <!--<div class="col-sm-10">-->
                    <!--<input type="text" class="form-control" id="admin_password" name="admin_password" value="{$admin.admin_password}" placeholder="管理员密码">-->
                <!--</div>-->
            <!--</div>-->
            <div class="form-group">
                <label for="admin_role" class="col-sm-2 control-label">管理员角色</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="admin_role" name="admin_role" value="{:config('rbac.RBAC_ROLES')[$admin.admin_role]}" placeholder="管理员角色">
                </div>
            </div>
        </div>
        <!-- /.box-body -->
        <div class="box-footer">
            <input type="hidden" name="__token__" value="{$Request.token}" />
            <a href="javascript:;" id="delBtn" class="btn btn-info pull-right">删除</a>
        </div>
        <!-- /.box-footer -->
    </form>
</div>
<script type="text/javascript">
    //jQuery代码
    $(function(){
        //给查看按钮绑定点击事件
        $('#delBtn').on('click',function(){
            layer.confirm('您确定要删除这个管理员？', {
                btn: ['确定','取消'] //按钮
            }, function(){
                $('form').submit();
            }, function(){
                layer.closeAll('dialog');
            });
        });
    });
</script>
{/block}